2 ==============================================================================
4 This is an automatically generated file created by the Jucer!
6 Creation date: 1 May 2011 12:12:59pm
8 Be careful when adding custom code to these files, as only the code within
9 the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
14 ------------------------------------------------------------------------------
16 The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
17 Copyright 2004-6 by Raw Material Software ltd.
19 ==============================================================================
22 //[Headers] You can add your own extra header files here...
25 #include "MainComponent.h"
28 //[MiscUserDefs] You can add your own user definitions and misc code here...
31 //==============================================================================
32 MainComponent::MainComponent ()
33 : helloWorldLabel (0),
36 addAndMakeVisible (helloWorldLabel
= new Label (String::empty
,
38 helloWorldLabel
->setFont (Font (40.0000f
, Font::bold
));
39 helloWorldLabel
->setJustificationType (Justification::centred
);
40 helloWorldLabel
->setEditable (false, false, false);
41 helloWorldLabel
->setColour (Label::textColourId
, Colours::black
);
42 helloWorldLabel
->setColour (TextEditor::textColourId
, Colours::black
);
43 helloWorldLabel
->setColour (TextEditor::backgroundColourId
, Colour (0x0));
45 addAndMakeVisible (quitButton
= new TextButton (String::empty
));
46 quitButton
->setButtonText (L
"Quit");
47 quitButton
->addListener (this);
56 //[Constructor] You can add your own custom stuff here..
60 MainComponent::~MainComponent()
62 //[Destructor_pre]. You can add your own custom destruction code here..
65 deleteAndZero (helloWorldLabel
);
66 deleteAndZero (quitButton
);
69 //[Destructor]. You can add your own custom destruction code here..
73 //==============================================================================
74 void MainComponent::paint (Graphics
& g
)
76 //[UserPrePaint] Add your own custom painting code here..
79 g
.fillAll (Colour (0xffc1d0ff));
81 g
.setColour (Colours::white
);
82 g
.fillPath (internalPath1
);
83 g
.setColour (Colour (0xff6f6f6f));
84 g
.strokePath (internalPath1
, PathStrokeType (5.2000f
));
86 //[UserPaint] Add your own custom painting code here..
90 void MainComponent::resized()
92 helloWorldLabel
->setBounds (152, 80, 296, 48);
93 quitButton
->setBounds (getWidth() - 176, getHeight() - 60, 120, 32);
94 internalPath1
.clear();
95 internalPath1
.startNewSubPath (136.0f
, 80.0f
);
96 internalPath1
.quadraticTo (176.0f
, 24.0f
, 328.0f
, 32.0f
);
97 internalPath1
.quadraticTo (472.0f
, 40.0f
, 472.0f
, 104.0f
);
98 internalPath1
.quadraticTo (472.0f
, 192.0f
, 232.0f
, 176.0f
);
99 internalPath1
.lineTo (184.0f
, 216.0f
);
100 internalPath1
.lineTo (200.0f
, 168.0f
);
101 internalPath1
.quadraticTo (96.0f
, 136.0f
, 136.0f
, 80.0f
);
102 internalPath1
.closeSubPath();
104 //[UserResized] Add your own custom resize handling here..
108 void MainComponent::buttonClicked (Button
* buttonThatWasClicked
)
110 //[UserbuttonClicked_Pre]
111 //[/UserbuttonClicked_Pre]
113 if (buttonThatWasClicked
== quitButton
)
115 //[UserButtonCode_quitButton] -- add your button handler code here..
117 JUCEApplication::quit();
119 //[/UserButtonCode_quitButton]
122 //[UserbuttonClicked_Post]
123 //[/UserbuttonClicked_Post]
128 //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
132 //==============================================================================
134 /* -- Jucer information section --
136 This is where the Jucer puts all of its metadata, so don't change anything in here!
140 <JUCER_COMPONENT documentType="Component" className="MainComponent" componentName=""
141 parentClasses="public Component" constructorParams="" variableInitialisers=""
142 snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
143 fixedSize="1" initialWidth="600" initialHeight="300">
144 <BACKGROUND backgroundColour="ffc1d0ff">
145 <PATH pos="0 0 100 100" fill="solid: ffffffff" hasStroke="1" stroke="5.19999981, mitered, butt"
146 strokeColour="solid: ff6f6f6f" nonZeroWinding="1">s 136 80 q 176 24 328 32 q 472 40 472 104 q 472 192 232 176 l 184 216 l 200 168 q 96 136 136 80 x</PATH>
148 <LABEL name="" id="be4f6f2e5725a063" memberName="helloWorldLabel" virtualName=""
149 explicitFocusOrder="0" pos="152 80 296 48" textCol="ff000000"
150 edTextCol="ff000000" edBkgCol="0" labelText="Hello World!" editableSingleClick="0"
151 editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
152 fontsize="40" bold="1" italic="0" justification="36"/>
153 <TEXTBUTTON name="" id="bcf4f7b0888effe5" memberName="quitButton" virtualName=""
154 explicitFocusOrder="0" pos="176R 60R 120 32" buttonText="Quit"
155 connectedEdges="0" needsCallback="1" radioGroupId="0"/>